package base.Stream流;

import java.util.ArrayList;
import java.util.Collections;
import java.util.function.Consumer;

public class 练习_3 {
    public static void main(String[] args) {

        ArrayList<String> list = new ArrayList<>();
        Collections.addAll(list,"zhansan","lisi");

        list.stream().map(String::toUpperCase).forEach(new Consumer<String>() {
            @Override
            public void accept(String s) {
                System.out.println(s);
            }
        });

        list.stream().map(String::toUpperCase).forEach(System.out::println);
    }
}
